#include "stdio.h"
#include "string.h"

main()
{
    int shu[60][2];
    int i,j,a,b,n;
    memset(shu,0,sizeof(shu));
    
    shu[1][0]=1;
    shu[1][1]=1;
    for (i=2;i<=46;i++)
    {
        shu[i][0]=shu[i-1][0]+shu[i-1][1];
        shu[i][1]=shu[i-1][0];
    }    
    
    i=0;
    scanf("%d",&n);
    for (i=1;i<=n;i++)
    {
        scanf("%d",&a);
        printf("Scenario #%d:\n",i);
        printf("%d\n",shu[a][0]+shu[a][1]);    
        if (i!=n) printf("\n");
          
    }
      /* scanf("%d",&a);*/
    return 0;    
}